package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.entity.Employee;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface EmployeeMapper {

    /**
     * 根据用户名查询员工
     * @param username
     * @return
     */
    @Select("select * from employee where username = #{username}")
    Employee getByUsername(String username);

    void insert(Employee employee);


    /**
     * 启动禁用员工账号
     * @param buildStatus
     */
    void updateStatus(Employee buildStatus);

    /**
     * 分页查询
     * @param name
     * @return
     */
    Page<Employee> getNamePage(String name);


    /**
     * id查询
     * @param id
     * @return
     */
    Employee getId(Long id);


    /**
     * 员工信息修改
     * @param employee
     */
    void updateEmp(Employee employee);

}
